<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE HTML>
<html>
<head>
    <base href="<%=basePath%>">
    <title></title>
    <meta http-equiv="cache-control" content="no-cache">

    <link rel="stylesheet" type="text/css" href="/css/edittable.css"  ></link>
    <link rel="stylesheet" type="text/css" href="/css/validate.css"  ></link>
    <script type="text/javascript"  src="/js/jquery-1.8.0.js"></script>
</head>

<body>
    <div class ="div_title">
        <div class="div_titlename"> <img src="/images/san_jiao.gif" ><span>商品分类管理</span></div>
    </div>

    <form action="CateServlet" method="post" >
        <input type="hidden" name="flag" value="rolePower" >
        <input type="hidden" name="id" value="${admin.id}" >
        <table border="1" class="main_table">
            <tr>
                <th>商品名称</th>
                <th>一级菜单</th>
                <th>二级菜单</th>
            </tr>

            <c:forEach var="m" items="${menuList }">
                <tr>
                    <td>
                        <input type="checkbox" name="menuIds" value="${m.id }" id="${m.id}" class="firstCheck"> ${m.menuName }
                    </td>
                    <td>
                        <c:forEach var="m_sub" items="${m.subMenuList }">
                            <input type="checkbox" name="menuIds" value="${m_sub.id }" id="${m_sub.id }" class="doubleCheck"> ${m_sub.menuName }<br>
                        </c:forEach>
                    </td>
                </tr>
            </c:forEach>

            <tr>
                <td class="td_info"> </td>
                <td>
                    <input class="form_btn" type="submit" value="提交" onclick="return confirm('确认要提交吗')"/>
                    <input type="reset"  class="form_btn" value="重置" /> </td>
                <td>
                    <label id="result_msg" class="result_msg">${msg}</label>
                </td>
            </tr>
        </table>
    </form>

</body>
</html>